/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JWindow;

/**
 *
 * @author kevin
 */
public class WelcomePanel extends JWindow{

    @Override
    public void paint(Graphics g) {
        g.drawImage(image, 0, 0, this);
        g.drawString("loading.....", iconWidth/3, iconHeight/2);
    }
    private int iconWidth = 480;
    private int iconHeight = 283;
    Image image;
    public WelcomePanel(){
        image = this.getToolkit().createImage("image/welcomeimage.jpg");
        Dimension screenSize = this.getToolkit().getScreenSize();
        int x = (screenSize.width-iconWidth)/2;
        int y = (screenSize.height-iconHeight)/2;
        this.setBounds(x, y, iconWidth, iconHeight);
        this.setVisible(true);
        this.setAlwaysOnTop(true);
    }
}
